<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>规格选择</title>
		<link rel="stylesheet" type="text/css" href="../../static/css/specification.css" />
		<link rel="stylesheet" type="text/css" href="../../static/css/overall.css" />
		<link rel="stylesheet" type="text/css" href="../../static/css/nav.css" />
		<link rel="stylesheet" href="../../static/bootstrap-3.3.7/css/bootstrap.min.css" />
		<link rel="stylesheet" type="text/css" href="../../icon/iconfont.css" />
		<link rel="stylesheet" href="../../static/css/page.css" />
	</head>

	<body>

		<div class="wary">
			<!--导航-->
			<div class="nav">
				<div class="nav_h flex main_zdy mainAlign_between sideAlign_center">

					<div class="nav_h_l">
						欢迎回到商家管理中心，祝你生意兴隆
					</div>
					<div class="nav_h_r flex main_zdy sideAlign_center">

						<div class="index">商城首页</div>
						<div class="inform">通知提示

							<!--消息通知-->
							<div class="hint">

								<div class="hint_t">最新消息</div>

								<div class="newslist flex side_sdx">

									<div class="flex main_zdy newslist_d sideAlign_center">

										<div class="newslist_d_img"><img src=""></div>
										<div class="flex side_sdx newslist_d_c">
											<div>您的订单：订单单号12455484952889463196323</div>
											<div>2017-07-24 04:20:35</div>
										</div>

									</div>

									<div class="all">查看全部15845条消息</div>

								</div>

							</div>

						</div>

						<!--用户-->
						<div class="user flex main_zdy sideAlign_center">
							<img src="https://gss0.bdstatic.com/5bVWsj_p_tVS5dKfpU_Y_D3/res/r/image/2018-07-23/a9ab6d58efea01bf2198d58df65e324f.jpg">
							<div>sdddasdasdfqwsdsads<i class="iconfont icon-xiabiao"></i></div>

							<div class="quit">
								<div>管理安全退出</div>
							</div>

						</div>

					</div>

				</div>
				<div class="navigation flex main_zdy sideAlign_center">
					<div class="logo">友惠家</div>
					<div class="navigation_n flex main_zdy">

						<div onclick="window.open('../index.html','_self')">首页</div>
						<div class="onn">商品
							<ul>
								<li>发布商品</li>
								<li>规格管理</li>
								<li>品牌管理</li>
							</ul>
						</div>
						<div onclick="window.open('../indent/goodsindent.html','_self')">订单
							<ul>
								<li>商品订单</li>
								<li>物流配送</li>
								<li>评价管理</li>
							</ul>
						</div>

					</div>
				</div>
			</div>

			<div class="specification flex main_zdy">

				<div class="goods_l">
					<div onclick="window.open('./firststep.html','_self')">发布商品</div>
					<div onclick="window.open('./specification.html','_self')" class="lon">产品规格</div>
					<div onclick="window.open('./trademark.html','_self')">品牌选择</div>
				</div>

				<div class="goods_r">
					<div class="issue">商家管理中心 > 商品 > 规格管理</div>

					<div class="goods_c">
						<div class="goods_v_t flex main_zdy mainAlign_between">
							<div>规格列表</div>
							<button class="bth btn-success" data-toggle="modal" data-target="#myModal"><i class="iconfont icon-jia"></i>新增商品规格</button>
						</div>
						<div class="operationhint flex side_sdx">
							<div>操作提示:</div>
							<div>1、商品规格只能添加2个（包括平台预设规则），每个规格只能添加10个规格值。</div>
							<div>2、平台设置的规格不能编辑，但可以在商品发布时设置别名。平台的颜色规格可是设置不同颜色的商品图片。</div>
						</div>

						<div class="specificationlist flex side_sdx">
							<div class="specificationlist_t flex main_zdy sideAlign_center">
								<div>规格</div>
								<div>规格值</div>
								<div>操作</div>
							</div>
							<!--<div class="specificationlist_l flex main_zdy sideAlign_center">
								<div>颜色</div>
								<div>多色/渐变色，白色，红色，粉色，橙色，棕色，咖啡色，黄色，绿色，薄荷绿，军绿色，灰绿色，藏青色，蓝色，湖蓝色，蓝灰色，暗蓝色，紫色，灰色，银灰色</div>
								<div><button class="bth btn_specification" disabled="disabled">平台预设规格</button></div>
							</div>-->
							<div id="demoContent"></div>
 							<!--<div class="page" id="page"></div>-->
 							<script type="text/x-handlebars-template" id="demo">
 								{{#each this}}
 									<div class="specificationlist_l flex main_zdy sideAlign_center">
										<div>{{name}}</div>
										<div>
										{{#each propertyValueVos}}
										{{value}}
										{{/each}}
										</div>
										<div>
											<button class="bth btn_specification compile" data-toggle="modal" data-target="#myModall">编辑</button>
											<button class="bth btn-del del" data_id='{{id}}'>删除</button>
										</div>
									</div>
 								{{/each}}
 							</script>
						</div>

					</div>

				</div>

			</div>

			<!-- 添加 -->
			<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
				<div class="modal-dialog" role="document">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
							<h4 class="modal-title" id="myModalLabel">新增商品规格</h4>
						</div>
						<div class="modal-body">
							<div class="flex main_zdy modal-body-c">
								<div class="modal-body-c-l">商品类别</div>
								<div class="modal-body-c-r flex main_zdy">
									<select name="" id="onegoodsL">
										<!--<option value=""></option>-->
									</select>
									<select name="" id="twogoodsL">
										<option value=""></option>
									</select>
								</div>
							</div>
							
							<!--一级列表-->
							<script type="text/x-handlebars-template" id="onegoods">
								{{#each this}}
									<option value="{{name}}"  id='{{id}}' codeid='{{codeid}}'>{{name}}</option>
								{{/each}}
							</script>
							
							<!--二级列表-->
							<script type="text/x-handlebars-template" id="twogoods">
								{{#each this}}
									<option value="{{name}}" id='{{id}}' codeid='{{codeid}}'>{{name}}</option>
								{{/each}}
							</script>
							
							<div class="flex main_zdy modal-body-c">
								<div class="modal-body-c-l"><span class="redc">*</span>规格名称:</div>
								<div class="modal-body-c-r">
									<input type="text" class="specname"/>
									<p>请填写常用的商品规格的名称；例如：颜色；尺寸等。</p>
								</div>
							</div>
							<div class="flex main_zdy modal-body-c">
								<div class="modal-body-c-l"><span class="redc">*</span>规格名称:</div>
								<div class="modal-body-c-r">
									<div class="specificationC">
										<div class="specificationsParameter"><input type="text" class="specvalue"/></div>
									</div>
									<div><button class="addspecification"><i class="iconfont icon-jia"></i>添加规格值</button></div>
								</div>
							</div>
						</div>
						<div class="modal-footer">
							<button type="button btn-xs" class="btn btn-default" data-dismiss="modal">放弃操作</button>
							<button type="button btn-xs" class="btn btn-primary submit" data-dismiss="modal">确认提交</button>
						</div>
					</div>
				</div>
			</div>
			
			
			<!-- 修改 -->
			<div class="modal fade" id="myModall" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
				<div class="modal-dialog" role="document">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
							<h4 class="modal-title" id="myModalLabel">编辑规格</h4>
						</div>
						<div class="modal-body">
							<div class="flex main_zdy modal-body-c">
								<div class="modal-body-c-l">商品类别</div>
								<div class="modal-body-c-r flex main_zdy">
									<select name="">
										<!--<option value=""></option>-->
									</select>
									<select name="">
										<option value=""></option>
									</select>
								</div>
							</div>
							
							<!--一级列表-->
							<script type="text/x-handlebars-template" id="onegoods">
								{{#each this}}
									<option value="{{name}}"  id='{{id}}' codeid='{{codeid}}'>{{name}}</option>
								{{/each}}
							</script>
							
							<!--二级列表-->
							<script type="text/x-handlebars-template" id="twogoods">
								{{#each this}}
									<option value="{{name}}" id='{{id}}' codeid='{{codeid}}'>{{name}}</option>
								{{/each}}
							</script>
							
							<div class="flex main_zdy modal-body-c">
								<div class="modal-body-c-l"><span class="redc">*</span>规格名称:</div>
								<div class="modal-body-c-r flex main_zdy">
									<input type="text" />
									<div class="affirm">确认</div>
								</div>
							</div>
							<div class="flex main_zdy modal-body-c">
								<div class="modal-body-c-l">规格值:</div>
								<div class="modal-body-c-r flex side_sdx amendC">
									<!--<div class="flex main_zdy sideAlign_center ">
										<input type="text" />
										<div class="affirm">确认</div>
										<div class="del">删除</div>
									</div>-->
								</div>
							</div>
							<div class="flex main_zdy modal-body-c">
								<div class="modal-body-c-l">规格值:</div>
								<div class="modal-body-c-r flex main_zdy sideAlign_center">
									<div><input type="text" /></div>
									<div class="amendsubmit">提交</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>

		</div>

		<script src="../../static/js/jquery-1.9.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../static/js/handlebars-v4.0.10.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../static/js/page.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../static/bootstrap-3.3.7/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../static/js/overall.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../static/js/nav.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../static/js/specification.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			Handlebars.registerHelper('if_eq', function(v1, v2, opts) {
				if(v1 == v2)
					return opts.fn(this);
				else
					return opts.inverse(this);
			});
		</script>
	</body>

</html>